//
//  MusicEntry.swift
//  MusicControlExtension
//
//  Created by nkl on 2024/10/22.
//

import Foundation
import SwiftUI
import WidgetKit

// 1. 数据模型
struct MusicEntry: TimelineEntry {
    let date: Date
    let title: String
    let auth: String
    let imageData: Data?
    let isPlay: Bool
    let type: String
    let isStatic: Bool

    var asMusicModel: ControlMusicModel {
        let model = ControlMusicModel(title: title, auth: auth, imageData: imageData, isPlay: isPlay, isStatic: isStatic)
        return model
    }
}

// 1. 数据模型
struct ControlMusicModel {
    let title: String
    let auth: String
    let imageData: Data?
    let isPlay: Bool
    let isStatic: Bool
}
